package com.changgou.goods.dao;

import com.changgou.goods.pojo.Brand;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BrandMapper extends Mapper<Brand> {

    @Select("select a.* from tb_brand a join tb_category_brand b on a.id = b.brand_id" +
            "join tb_category c on c.id = b.category_id where c.name = #{cateName}")
    List<Brand> findByCateName(String cateName);
}
